<?php
class Sgit_Util_Suma extends Zend_View_Helper_Abstract
{

    static function run( $rows, $campos)
    {
        $suma=array(); 
     	foreach ((array) $rows as $row )
    	{
    	   foreach($campos as $campo)
           {
    	       if(!isset($suma[$campo])) $suma[$campo]= 0;
    	       $suma[$campo]+= $row[$campo];
    	   }
    	}
        
        return $suma;
    }
        
}